var SearchForm = (function () {
  var template = /* html */ `
    <div class="search-form">
      <el-form inline label-width="auto">
        <el-form-item label="系统订单编号">
          <el-input v-model="search.orderId" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="订单编号">
          <el-input v-model="search.companyOrderId" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="工厂型号">
          <el-input v-model="search.factoryId" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="客户型号">
          <el-input v-model="search.customerId" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="物料名称">
          <el-input v-model="search.materialName" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="供方编号">
          <el-input v-model="search.providerNo" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="供应商">
          <el-input v-model="search.providerName" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="描述">
          <el-input v-model="search.colorDescription" class="search-input"></el-input>
        </el-form-item>
        <el-form-item label="状态">
          <el-select clearable v-model="search.status" class="search-input">
            <el-option v-for="item in statusList" :key="'status_'+item.value" :value="item.value" :label="item.label">
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="检验日期">
          <el-date-picker v-model="search.startTime" value-format="timestamp" :editable="false" :picker-options="startDateOption"
            style="width:140px"></el-date-picker>
          <span>-</span>
          <el-date-picker v-model="search.endTime" value-format="timestamp" :editable="false" :picker-options="endDateOption"
            style="width:140px"></el-date-picker>
        </el-form-item>
      </el-form>
    </div>
  `

  return {
    mixins: [datePickerOptionsMixin('startTime', 'endTime')],

    props: {
      search: {
        type: Object,
        required: true
      }
    },

    data: function () {
      return {
        statusList: i18n.getDropDown('iqc.iqcReportApproval.status', [0, 1, 2])
      }
    },

    template: template
  }
})()
